$("#deal_name").change(function(){
    //保存新的交易名称
    var deal_name = $("#deal_name").val();
    //alert(deal_name);
    json_str = JSON.stringify({'deal_name': deal_name});
    $.ajax({
            url: "/deal/change_name/",
            type: 'POST',
            data: json_str,
            dataType: 'json',
            success: function(data){
              console.log(data.state);
            },
        });
});